package com.efuture.chaptersix

/* @Description: Kotlin语言定义范型类
 * @Auther: zhaoshanshan
 * @Date: 2022/03/07/7:44 下午
 */
class Demo96<T>(val obj:T){
    fun show(){
        println("万能输入器:$obj")
    }
}
data class Test1(val name:String,val age:Int,val sex:Char)
data class Test2(val name:String,val age:Int,val sex:Char)

fun main() {
   Demo96(Test1("赵山山",30,'男')).show()
   Demo96(Test2("刘一凡",36,'男')).show()
   Demo96(122).show()
   Demo96(true).show()

}
    